package fr.umlv.m2.recipes.ideas.bean;

import java.io.Serializable;

/**
 * Define a keyword of a recipe uses in the database
 * @author Christophe Chillan
 *
 */
@SuppressWarnings("serial")
public class KeywordBean implements Serializable {
	
	private int id;
	private String keyword;
	
	/**
	 * Create a keyword for a recipe
	 */
	public KeywordBean(){}
	
	/**
	 * Create a keyword for a recipe
	 * @param keyword
	 */
	public KeywordBean(String keyword){
		this.keyword = keyword;
	}
	
	/**
	 * Create a keyword for a recipe
	 * @param keyword
	 * @param id
	 */
	public KeywordBean(String keyword, int id){
		this.keyword = keyword;
		this.id = id;
	}
	
	/**
	 * Get the id of a keyword
	 * @return the id stored in the database
	 */
	public int getId() {
		return id;
	}
	
	/**
	 * Set the id of a keyword
	 * @param id
	 */
	public void setId(int id) {
		this.id = id;
	}
	
	/**
	 * Get the keyword field related to the recipe
	 * @return the field stored in the database
	 */
	public String getKeyword() {
		return keyword;
	}
	
	/**
	 * Set the keyword field in the database
	 * @param keyword
	 */
	public void setKeyword(String keyword) {
		this.keyword = keyword;
	}
	
	/**
	 * @see Object
	 */
	@Override
	public String toString() {
		
		return ("mot cle : "+keyword);
	}

}
